#!/bin/bash

echo "===INIT==UBUNTU=14.04-TLS==="
sudo echo "SUDO ROOT"

echo "==>>mkdir==>/works"
sudo mkdir -p /works/oschina

sudo chown -Rf $USER:$USER /works

echo "==>>apt-get==>Install Git"
sudo apt-get install -y git
read -p "GIT用户: " GIT_NAME
read -p "GIT邮件: " GIT_EMAIL
if [ ! -z "$GIT_NAME" -a ! -z "$GIT_EMAIL" ]; then 
  echo "==> config git --global $GIT_NAME info"
  git config --global user.name "$GIT_NAME"
  git config --global user.email "$GIT_EMAIL"
  git config --global push.default simple
else
  echo "==> git no global config"
fi

echo "==>>git==>https://git.oschina.net/darcyg/ubuntu-utils.git"
cd /works/oschina

git clone https://git.oschina.net/darcyg/ubuntu-utils.git

